import Vue from 'vue'
import VueRouter from 'vue-router'
import Movie from '../views/home/Movie.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect: '/home/reying'
  },
  {
    path: '/home',
    name: 'Movie',
    component: Movie,
    children:[
      { path: '/home', redirect: '/home/reying' },
      {path:'reying',name:'reying',component:()=>import(/*webpackChunkName:'reying' */ '../views/home/Reying.vue')},
      {path:'yingyuan',name:'yingyuan',component:()=>import(/*webpackChunkName:'yingyuan' */ '../views/home/Yingyuan.vue')},
      {path:'daiying',name:'daiying',component:()=>import(/*webpackChunkName:'daiying' */ '../views/home/Daiying.vue')},
      {path:'jingdian',name:'jingdian',component:()=>import(/*webpackChunkName:'jingdian' */ '../views/home/Jingdian.vue')}
    ]
  },
  {
    path: '/video',
    name: 'Video',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "video" */ '../views/Video.vue')
  },
   {
    path: '/minivideo',
    name: 'MiniVideo',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "minivideo" */ '../views/MiniVideo.vue')
  },
   {
    path: '/show',
    name: 'Show',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "show" */ '../views/Show.vue')
  },
   {
    path: '/me',
    name: 'Me',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "me" */ '../views/Me.vue')
  },
  {
    path:'/item/:id',
    name:'Item',
    component:()=>import(/* webpackChunkName: "item" */ '../views/home/Item.vue')
  },
    {
    path:'*',
    name:'baocuo',
    component:()=>import(/* webpackChunkName: "item" */ '../views/baocuo.vue')
  },
  {
    path:'/citylist',
    name:'Citylist',
    component:()=>import(/* webpackChunkName: "citylist" */ '../views/Citylist.vue')

  }
]

const router = new VueRouter({
  routes
})

export default router
